package com.example.domain.vo.user;

import com.example.tools.page.PageInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

@Data
@EqualsAndHashCode
@Accessors(chain = true)
public class ListVo extends PageInfo<ListVo.Meta> implements com.example.tools.Result.Data {

    @Override
    public ListVo setRecordList(List<Meta> recordList) {
        super.setRecordList(recordList);
        return this;
    }

    @Override
    public ListVo setRecordCount(Integer recordCount) {
        super.setRecordCount(recordCount);
        return this;
    }

    @Data
    @EqualsAndHashCode
    @Accessors(chain = true)
    public static class Meta {
        /***
         * //用户ID
         */
        private Long userId;

        /***
         * //用户名称
         */
        private String userName;

        /***
         * //密码
         */
        private String password;

        /***
         * //真实姓名
         */
        private String realName;

        /***
         * //年龄
         */
        private String age;

        /***
         * //用户类型
         */
        private String type;

        /***
         * //电话号码
         */
        private String phone;

        /***
         * //描述信息
         */
        private String remarks;

        /***
         * //状态
         */
        private String status;

        /***
         * //逻辑删除状态（0否、1是）
         */
        private Integer deleted;

        /***
         * //更改时间
         */
        @DateTimeFormat(pattern = "yy-MM-dd HH:mm:ss")
        private LocalDateTime updateTime;

        /***
         * //创建时间
         */
        @DateTimeFormat(pattern = "yy-MM-dd HH:mm:ss")
        private LocalDateTime createTime;
    }
}
